import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'dva';
//Users components
import UserList from './components/UserList';

function Users({location, dispatch, users}){
    const userListProps = {
        location,
        dispatch,
        users,
    };
    return (
        <div>
            <UserList {...userListProps}></UserList>
        </div>
    )
}

Users.propTypes = {
    users: PropTypes.object,
}

function mapStateToProps({users}){
    return {users}
};

export default connect(mapStateToProps)(Users);
